package com.bosch.in.rtp1.ept.action.form;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import org.apache.struts.action.ActionForm;

import com.bosch.in.rtp1.ept.model.dto.HoldCodeFilter;
/**
 * Class is used to store parameters which are search conditions to display released hold table.
 * @author TPR1HC
 *
 */
public class ReleasedHoldCriteriaForm extends ActionForm{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Date holdEndFrom;
	private Date holdEndTo;
	

	private List<HoldCodeFilter> holdCodes = new ArrayList<HoldCodeFilter>();
	private List<HoldCodeFilter> holdCodesReclassified = new ArrayList<HoldCodeFilter>();
	
	private String selectedHC;
	private String selectedHCReclass;

	public ReleasedHoldCriteriaForm() {
		// Default hold end is in 3 month to now.
		Calendar calendar = Calendar.getInstance();
		holdEndTo = calendar.getTime();
		
		calendar.add(Calendar.MONTH, -3);
		holdEndFrom = calendar.getTime();
	}

	public Date getHoldEndFrom() {
		return holdEndFrom;
	}

	public void setHoldEndFrom(Date holdEndFrom) {
		this.holdEndFrom = holdEndFrom;
	}

	public Date getHoldEndTo() {
		return holdEndTo;
	}

	public void setHoldEndTo(Date holdEndTo) {
		this.holdEndTo = holdEndTo;
	}

	public List<HoldCodeFilter> getHoldCodes() {
		return holdCodes;
	}

	public void setHoldCodes(List<HoldCodeFilter> holdCodes) {
		this.holdCodes = holdCodes;
	}

	public List<HoldCodeFilter> getHoldCodesReclassified() {
		return holdCodesReclassified;
	}

	public void setHoldCodesReclassified(List<HoldCodeFilter> holdCodesReclassified) {
		this.holdCodesReclassified = holdCodesReclassified;
	}

	public String getSelectedHC() {
		return selectedHC;
	}

	public void setSelectedHC(String selectedHC) {
		this.selectedHC = selectedHC;
	}

	public String getSelectedHCReclass() {
		return selectedHCReclass;
	}

	public void setSelectedHCReclass(String selectedHCReclass) {
		this.selectedHCReclass = selectedHCReclass;
	}
	
}
